// const Mock = require('mockjs')
const fs = require('fs');
const path = require("path");
 
const applyList=[
    {
        "applyerId":"20181844",
        "applyerName":"邓冬梅",
        "deviceId":"2351",
        "deviceName":"钳子",
        "applyTime":"2021年8月13日",
        "applyContent":"工作需要"
    },
    {
        "applyerId":"20181844",
        "applyerName":"邓冬梅",
        "deviceId":"1312",
        "deviceName":"支架",
        "applyTime":"2021年8月11日",
        "applyContent":"急需"
    },
    {
        "applyerId":"20181844",
        "applyerName":"邓冬梅",
        "deviceId":"1311",
        "deviceName":"示波器",
        "applyTime":"2021年8月12日",
        "applyContent":"需要借用两天"
    }
]

function getData(){
    let data=[]
    for(let i in applyList){
      let n=applyList[i]
      let d={
        "applyerId":n.applyerId,
        "applyerName":n.applyerName,
        "deviceId":n.deviceId,
        "deviceName":n.deviceName,
        "applyTime":n.applyTime,
        "applyContent":n.applyContent
      }
      data.push(d)
    }
    return data
}

module.exports=[
    {
      url: '/apply/list',
      type: 'get',
      response: config => {
        return {
          code: 20000,
          data: getData()
        }
      }
    }
]
